﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/Master.Master" AutoEventWireup="true" CodeBehind="wFrmUsuario.aspx.cs" Inherits="Crosland.Automotriz.Web.Seguridad.wFrmUsuario" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxGridView" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxEditors" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPopupControl" tagprefix="dx" %>
<%@ Register assembly="DevExpress.Web.v13.1, Version=13.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" namespace="DevExpress.Web.ASPxPanel" tagprefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="cphMain" runat="server">

<script type="text/javascript">
    // <![CDATA[
    function ShowMsj() {
        popupmsj.Show();
    }
    function ShowConfirmacion() {
        popupConfirmacion.Show();
    }
    // ]]> 
    </script>


     <script type="text/javascript">


         function pageLoad() {

             var control = document.getElementById('ctl00_cphMain_hfIndicador');
             cambiarImagenHeader();

             if (control.value == 'S') {
                 $find('<%= ((AjaxControlToolkit.CollapsiblePanelExtender)this.Master.FindControl("cpeMenuGeneral")).BehaviorID %>')._doClose();

                 control.value = 'N';
             }


         }

                

                
               

</script>


    <div class="main-header" style="width:100%">
                <div class="main-titulo">
                    Adm. Usuarios</div>
               
            </div>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
    <ContentTemplate>

     <asp:HiddenField ID="hfIndicador" runat="server" Value="S" />  
            <div style="padding: 5px">
                <table width="100%">
                    <tr>
                        <td width="105">
                            <dx:ASPxButton ID="btnNuevo" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" onclick="btnNuevo_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Nuevo" 
                                Width="100px">
                                <Image Url="~/Images/bt_new_button.gif">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td width="105">
                            <dx:ASPxButton ID="btnModificar" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" onclick="btnModificar_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Modificar" 
                                Width="100px">
                                <Image Url="~/Images/edit2.gif">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td width="105">
                            <dx:ASPxButton ID="btnEliminar" runat="server" ClientInstanceName="btnEliminar" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" onclick="btnEliminar_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Anular" 
                                Width="100px">
                                <Image Url="~/Images/delete.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnSalir" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" onclick="btnSalir_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Salir" 
                                Width="100px">
                                <Image Url="~/Images/logout.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="4" height="5">
                            <hr />
                        </td>
                    </tr>
                </table>
                <table width="100%">
                    <tr>
                        <td style="width: 84px">
                            <dx:ASPxLabel ID="lblTipoUsuario" runat="server" ForeColor="Black" 
                                Text="Tipo Usuario :">
                            </dx:ASPxLabel>
                        </td>
                        <td style="width: 178px">
                            <dx:ASPxComboBox ID="cboTipoUsuario" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" Height="30px" Spacing="0" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                                <ItemStyle Height="30px" />
                                <LoadingPanelImage Url="~/App_Themes/Office2010Blue/Editors/Loading.gif">
                                </LoadingPanelImage>
                                <LoadingPanelStyle ImageSpacing="5px">
                                </LoadingPanelStyle>
                                <DropDownButton Width="20px">
                                </DropDownButton>
                                <ButtonStyle Width="13px">
                                </ButtonStyle>
                                <Paddings PaddingLeft="5px" />
                            </dx:ASPxComboBox>
                        </td>
                        <td style="width: 118px">
                            <asp:CheckBox ID="chkEstado" runat="server" AutoPostBack="True" Checked="True" 
                                ForeColor="Black" oncheckedchanged="chkEstado_CheckedChanged" 
                                Text="Ver Habilitados" />
                        </td>
                        <td>
                            <dx:ASPxButton ID="btnFiltrarTipoUsuario" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" onclick="btnFiltrarTipoUsuario_Click" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Mostrar" 
                                Width="100px">
                                <Image Url="~/Images/search.png">
                                </Image>
                            </dx:ASPxButton>
                        </td>
                    </tr>
                </table>
                <div>
                    <dx:ASPxGridView ID="gvListUsuario" runat="server" AutoGenerateColumns="False" 
                        CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                        CssPostfix="Office2010Blue" KeyFieldName="ID_USUARIO" 
                        onafterperformcallback="gvListUsuario_AfterPerformCallback" 
                        onpageindexchanged="gvListUsuario_PageIndexChanged" Width="100%">
                        <Columns>
                            <dx:GridViewDataTextColumn Caption="ID" FieldName="ID_USUARIO" VisibleIndex="0">
                                <PropertiesTextEdit>
                                    <ValidationSettings ErrorText="Valor inválido">
                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                    </ValidationSettings>
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Nombre" FieldName="DES_NOMBRE" 
                                VisibleIndex="1">
                                <PropertiesTextEdit>
                                    <ValidationSettings ErrorText="Valor inválido">
                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                    </ValidationSettings>
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Apellidos" FieldName="DES_APELLIDOS" 
                                VisibleIndex="2">
                                <PropertiesTextEdit>
                                    <ValidationSettings ErrorText="Valor inválido">
                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                    </ValidationSettings>
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Email" FieldName="DES_EMAIL" 
                                VisibleIndex="3">
                                <PropertiesTextEdit>
                                    <ValidationSettings ErrorText="Valor inválido">
                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                    </ValidationSettings>
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn Caption="Estado" FieldName="DES_ESTADO" 
                                VisibleIndex="4">
                                <DataItemTemplate>
                                    <dx:ASPxLabel ID="lblEstado" runat="server" Text='<%# Eval("DES_ESTADO") %>'>
                                    </dx:ASPxLabel>
                                </DataItemTemplate>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="DES_PASSWORD" Visible="False" 
                                VisibleIndex="5">
                                <PropertiesTextEdit>
                                    <ValidationSettings ErrorText="Valor inválido">
                                        <RegularExpression ErrorText="Falló la validación de expresión Regular" />
                                    </ValidationSettings>
                                </PropertiesTextEdit>
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="USR_CREACION" Visible="False" 
                                VisibleIndex="8">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="DES_LARGA" Visible="False" 
                                VisibleIndex="7">
                            </dx:GridViewDataTextColumn>
                            <dx:GridViewDataTextColumn FieldName="IND_ESTADO" Visible="False" 
                                VisibleIndex="6">
                            </dx:GridViewDataTextColumn>
                        </Columns>
                        <SettingsBehavior AllowFocusedRow="True" />
                        <Settings ShowFilterRow="True" />
                        <SettingsBehavior AllowFocusedRow="True" />
                        <SettingsPager PageSize="20">
                        </SettingsPager>
                        <Settings ShowFilterRow="True" />
                        <SettingsLoadingPanel Text="Cargando&amp;hellip;" />
                        <Images SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
                            <LoadingPanelOnStatusBar Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanelOnStatusBar>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </Images>
                        <ImagesFilterControl>
                            <LoadingPanel Url="~/App_Themes/Office2010Blue/GridView/Loading.gif">
                            </LoadingPanel>
                        </ImagesFilterControl>
                        <Styles CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                            CssPostfix="Office2010Blue">
                            <Header ImageSpacing="5px" SortingImageSpacing="5px">
                            </Header>
                            <LoadingPanel ImageSpacing="5px">
                            </LoadingPanel>
                        </Styles>
                        <StylesPager>
                            <PageNumber ForeColor="#3E4846">
                            </PageNumber>
                            <Summary ForeColor="#1E395B">
                            </Summary>
                        </StylesPager>
                        <StylesEditors ButtonEditCellSpacing="0">
                            <ProgressBar Height="21px">
                            </ProgressBar>
                        </StylesEditors>
                    </dx:ASPxGridView>
                </div>
        </div>
               <dx:ASPxPopupControl ID="popupmsj" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupmsj" CloseAction="None" 
                    CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                    EnableViewState="False" HeaderText="Mensaje" 
                    LoadingPanelText="Cargando&amp;hellip;" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
                
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
<Paddings Padding="0px"></Paddings>
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
<BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px"></BorderBottom>
                    </ContentStyle>
                    <HeaderStyle>
                    <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                        PaddingTop="4px" />
<Paddings PaddingLeft="10px" PaddingTop="4px" PaddingRight="4px" PaddingBottom="4px"></Paddings>
                    </HeaderStyle>
                
                 <ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl5" runat="server" SupportsDisabledAttribute="True">

    <br />
      <dx:ASPxPanel ID="ASPxPanel2" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx:PanelContent ID="Panelpopup" runat="server">
                        <table align="center">
                        <tr>
                        <td colspan="2">
                        
                            <asp:Label ID="lblMensajeGeneral" runat="server"></asp:Label>
                            &nbsp;</td>
                        
                        </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;</td>
                            </tr>
                        
                        </table>
                        <table align="center">
                        <tr>
                        <td align="center">
                        
                            <dx:ASPxButton ID="ASPxButton3" runat="server" Text="Aceptar" 
                                AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css">
<ClientSideEvents Click="function(s, e) {
	popupmsj.Hide();
}"/>
                            </dx:ASPxButton>
                        </td>
                        
                        </tr>
                        </table>



                 </dx:PanelContent>
    </PanelCollection>
   </dx:ASPxPanel>
   </dx:PopupControlContentControl>
</ContentCollection>
                </dx:ASPxPopupControl>
      <dx:ASPxPopupControl ID="popupConfirmacion" runat="server" AllowDragging="True" 
                    ClientInstanceName="popupConfirmacion" CloseAction="None" 
                    CssFilePath="~/App_Themes/PlasticBlue/{0}/styles.css" CssPostfix="PlasticBlue" 
                    EnableViewState="False" HeaderText="Mensaje" 
                    LoadingPanelText="Cargando&amp;hellip;" Modal="True" 
                    PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter" 
                    SpriteCssFilePath="~/App_Themes/PlasticBlue/{0}/sprite.css" Width="300px">
                
                    <LoadingPanelImage Url="~/App_Themes/PlasticBlue/Web/dvLoading.gif">
                    </LoadingPanelImage>
                    <CloseButtonStyle>
                        <Paddings Padding="0px" />
<Paddings Padding="0px"></Paddings>
                    </CloseButtonStyle>
                    <ContentStyle>
                        <BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px" />
<BorderBottom BorderColor="#E0E0E0" BorderStyle="Solid" BorderWidth="1px"></BorderBottom>
                    </ContentStyle>
                    <HeaderStyle>
                    <Paddings PaddingBottom="4px" PaddingLeft="10px" PaddingRight="4px" 
                        PaddingTop="4px" />
<Paddings PaddingLeft="10px" PaddingTop="4px" PaddingRight="4px" PaddingBottom="4px"></Paddings>
                    </HeaderStyle>
                
                 <ContentCollection>
<dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">

    <br />
      <dx:ASPxPanel ID="ASPxPanel1" runat="server" DefaultButton="btCreate">
                    <PanelCollection>
                        <dx:PanelContent ID="PanelContent1" runat="server">
                        <table align="center">
                        <tr>
                        <td colspan="2">
                        
                            &nbsp;<dx:ASPxLabel ID="lblMensaje" runat="server">
                            </dx:ASPxLabel>
                        
                        
                        
                        </td>
                        
                        </tr>
                            <tr>
                                <td colspan="2">
                                    &nbsp;</td>
                            </tr>
                        
                        </table>
                        <table align="center">
                        <tr>
                        <td align="center">
                        
                            <dx:ASPxButton ID="btnAceptar" runat="server" Text="Aceptar" 
                                AutoPostBack="False" CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" 
                                OnClick="btnAceptar_Click">
<ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}"/>
                            </dx:ASPxButton>
                        </td>
                        <td>
                        
                            <dx:ASPxButton ID="ASPxButton5" runat="server" 
                                CssFilePath="~/App_Themes/Office2010Blue/{0}/styles.css" 
                                CssPostfix="Office2010Blue" 
                                SpriteCssFilePath="~/App_Themes/Office2010Blue/{0}/sprite.css" Text="Cancelar">
                                <ClientSideEvents Click="function(s, e) {
	popupConfirmacion.Hide();
}" />
                            </dx:ASPxButton>
                        
                        </td>
                        </tr>
                        </table>



                 </dx:PanelContent>
    </PanelCollection>
   </dx:ASPxPanel>
   </dx:PopupControlContentControl>
</ContentCollection>
                </dx:ASPxPopupControl>
    </ContentTemplate>
    </asp:UpdatePanel>
    </asp:Content>
